import pygame


class Snake(pygame.sprite.Sprite):
    def __init__(self, dims, size, img):
        super().__init__()
        self.dims = dims
        self.width, self.height = dims
        self.image = pygame.transform.scale(img, size)
        # self.spriteScale = pygame.transform.scale(self.image, (50, 50))
        # self.image.fill((random.randint(0, 255), random.randint(0, 255), random.randint(0, 255)))
        self.rect = self.image.get_rect()

        self.rect = (self.width, self.height)
        self.speed_x = 10
        self.direction = "right"

    def setDirection(self, direction):
        self.direction = direction

    def draw(self, screen):
        screen.blit(self.image, self.rect)